Repository navigation
fix(rest): the dataset query door judges admission on the refusal arm before it names holders (ADR-0150 D3 after ADR-0149 D2) - #32804
Conversation
…, not per deployment (ADR-0150 child B, part 1 of the webhook family) WIP: the switch, the platform-requested auth.* names, the bundle-addition rule, the package-scoped /meta read and the send's holder-filtered bundle. Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v Co-authored-by: Claude <noreply@anthropic.com>
…latform-requested auth names and the bundle-addition rule Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v Co-authored-by: Claude <noreply@anthropic.com>
…rrowing Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v Co-authored-by: Claude <noreply@anthropic.com>
…nd a pair's member as the package's own A read naming a dependent whose only member of a bundled name is an addition (a locale its base does not ship) was refused not-held-by-qualifier once email_template joined the package-scoped readers, and a pair's added member on its base's address was replaced by the registry's item. The qualifier now asks the holders as the caller it names, and keeps an item of a pair of the admitted package. The co-owner dogfood case asserts the ADR-0146 D2 refusal a co-owner meets first at install-local. Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v Co-authored-by: Claude <noreply@anthropic.com>
…he email template's narrowing; changeset Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v Co-authored-by: Claude <noreply@anthropic.com>
…inst its base Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v Co-authored-by: Claude <noreply@anthropic.com>
…ule top Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v Co-authored-by: Claude <noreply@anthropic.com>
…s base's address for a bundled type only Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v Co-authored-by: Claude <noreply@anthropic.com>
…rowing; pin the qualifier's holder ask for the nine Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v Co-authored-by: Claude <noreply@anthropic.com>
…-3giljf Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS Co-authored-by: Claude <noreply@anthropic.com>
…mplate send resolves its name from the caller's package (ADR-0150 D3) The flow notify node records the package whose own flow body is armed beside its template reference; the email and inbox channels hand it to sendTemplate/renderTemplate as callerPackageId; the registry loader resolves the name from it and, for a name two packages hold, reads the resolved holder's own address. A send that names no package keeps the bare-name meaning. Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS Co-authored-by: Claude <noreply@anthropic.com>
…is refused on both exact reads and listed by the upgrade report Two packages of one App share the App's customization pair, so a locale row there with no overrides declaration cannot say whose template it extends: each holder's exact read refuses it naming every holder, the list scoped to a holder leaves it out, and os migrate stored-references lists it under pairMembers. One holder, the App's own address and a row that declares its base keep being served. Pins for F1 (loader rungs, service ladder, notify node, channels, dogfood) and F2; changeset. Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS Co-authored-by: Claude <noreply@anthropic.com>
…otype.at, which the package's lib target does not declare Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS Co-authored-by: Claude <noreply@anthropic.com>
…) for email_template, beside api Two packages of two namespaces may now each hold one email template name, so the second package's item no longer overwrites the first's in MetadataManager's in-memory store: a read naming a package answers that package's own, and a read naming none of a two-holder name is the D3 refusal (#31527 B-shape item 1). Pins that email_template has no metadata redactor, so a save never takes the carry-forward's code-layer read for it (item 4). Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS Co-authored-by: Claude <noreply@anthropic.com>
…-3giljf # Conflicts: # packages/objectql/src/package-scoped-e8-readers.test.ts # packages/objectql/src/package-scoped-read.ts
…-3giljf # Conflicts: # packages/cli/src/utils/stored-package-references.ts # packages/metadata/src/package-slotted-store.ts
…es hold is no holder's own A package-less row (the environment's item, or a sys_metadata row bound to no package) of a name two or more packages hold is the customization of one holder and cannot say which (ADR-0150 D4). Each holder's exact read now refuses it 409 ambiguous-in-closure naming every holder, the list scoped to a holder (which a send made from it reads) leaves it out, and os migrate stored-references lists it under packageLessRows. One holder, the _env address and the platform-requested auth mails are unchanged. The rule sits in the exact qualifier, so it covers every type read by package (epic ruling 6761802819 on #31699). Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS Co-authored-by: Claude <noreply@anthropic.com>
…-3giljf # Conflicts: # packages/objectql/src/package-scoped-e8-readers.test.ts # packages/objectql/src/package-scoped-read.ts
…et (#32183) A disabled package's item is not a holder. `packageScopedHoldersOf` withholds a holder whose package is disabled (`isPackageDisabled`, the predicate `listItems` hides by), keeps the caller's own holding, and reads every holder under `includeDisabledPackages: true`, which `resolvePackageScopedName` forwards. Durable judgments read every holder: the four stored-reference backfills, the CLI stored-reference report and the picklist load audit, so a binding never moves with a reversible disable. The security catalog never re-targets a stored column that names a disabled holder, and a name only disabled packages hold is not-found there and in `holdsPlatformPermissionSet`, never the metadata service's by-name answer. The REST action rung answers a thrown package-scoped refusal as the declared 409, not `degraded`. Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp Co-authored-by: Claude <noreply@anthropic.com>
Pins, each with its BASE reading at main de141e3: - objectql: the source half (served holders, the caller's own holding, every holder on request, re-enable, a disabled base never promoting a bundle addition), the library readers including the read MCP `agent_prompt` makes, and action addressing. - Both `/meta` transports over the live `PACKAGE_SCOPED_READ_TYPES`: two holders with one disabled, only a disabled holder, a parity pin per type (the bare read and the list agree through disable and enable), and a shareable namespace's co-owners. - The REST action rung and the security catalog (no re-target of a disabled holder's column, no metadata fallback, the platform verdict). - Every durable judgment keeps every holder: the four backfills and the CLI stored-reference report. The picklist verdict (`picklistReferenceVerdict`: the load audit, the install door and a field's options) judges every holder, so a reversible disable of a dependency never refuses the next boot or empties a live field's options; the by-name `picklist` read judges the served holders. Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp Co-authored-by: Claude <noreply@anthropic.com>
Clause-② no (narrowing): one in-process library answer narrows for a name only disabled packages hold; every door move is listed FROM -> TO. Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp Co-authored-by: Claude <noreply@anthropic.com>
…eads no migration placeholder (#32183) The two label lines read `FROM → TO`, which the ADR-0087 gate takes as a migration prescription beside `not-required (no-migration-prescription)`. Each moved answer still reads as before → after; nothing is rewritten by a consumer, so the disposition stands. Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp Co-authored-by: Claude <noreply@anthropic.com>
…heir withheld item (#32183) With holders judged over the served set, the by-name read of a name only disabled packages hold resolved to nothing, and its envelope carried no package. The layered view's step 1b and `/published` ask that envelope whether a disable withheld the item, so both doors took the name as not withheld: `/layers` served the disabled package's code layer at the bare address and at `?package=` of any non-holder, and `/published` served its snapshot. The item face now answers such a name as that package's withheld item (item undefined, the envelope naming the disabled holder), the shape a disabled holder's read had, on both faces. Every door keeps the missing name's 404. Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp Co-authored-by: Claude <noreply@anthropic.com>
…ished 404s (#32183) The item face now carries part of the fix, so `@objectstack/metadata-protocol` joins the changeset. The note says the layered view and `/published` keep the missing name's 404 for a name only disabled packages hold, and lists the bare read of a name two or more disabled packages hold (409 → 404). Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp Co-authored-by: Claude <noreply@anthropic.com>
…n the action addressing pins (#32183) The file's import graph reaches `standalone-stack.ts`'s dynamic import of `@objectstack/metadata`; check:test-source-alias asks an edited test file to load it at module top, so no clocked case pays that transform. Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp Co-authored-by: Claude <noreply@anthropic.com>
…eview round on #32214 - notify node: a literal payload `template` string records the armed package too, as the channels read it (F-A). - the pair-row owner check is one self-contained function, pairRowOnAddress, which the exact read and the scoped list both ask: the declared base first (F-B), the App's own pair, two owners refused, a sole owner that is not one of the address's bases not served (S2). - SchemaRegistry.getPackageScopedItem skips a pair row that declares another holder as its base, so the App's address answers its own item. - stored-references hints, its module doc and the changeset say truthfully that no door binds an added member to one base today (#28777) (F-C). - changeset: Metadata-protocol narrowed; slotted set lists api, agent, skill and email_template; the package-less rule names PACKAGE_SCOPED_READ_TYPES; the pair row's sole-owner and App-slot rules. - email-service docs page: the new callerPackageId member. Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS Co-authored-by: Claude <noreply@anthropic.com>
…-3giljf # Conflicts: # packages/cli/src/commands/migrate/stored-references.integration.test.ts # packages/metadata/src/package-slotted-store.ts # packages/objectql/src/bare-name-one-holder.ts # packages/objectql/src/registry-bare-name-one-holder-ai-family.test.ts # packages/objectql/src/registry.ts # packages/qa/dogfood/test/bare-name-one-holder-flow-family.dogfood.test.ts # packages/services/service-automation/src/engine.ts
…holds take the served holder's stack Contract review M1 on #32327. A read naming no package, of a name an enabled and a disabled package both hold, now reads at the served holder's address: the plain read (the face), the layered read's code layer, overlay row and lock, and the layered row-ambiguity refusal, which no longer refuses a read the served holder addresses. Before, the layered code layer was the first composite in registration order (the disabled holder's when it registered first), and a legacy row bound to the disabled holder made the bare read answer 404. Pins on both transports, both registration orders: the plain read and /layers for every package-scoped type, and the plain read, /layers and /published with legacy rows bound to the disabled holder (REST harness and a booted kernel). Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp Co-authored-by: Claude <noreply@anthropic.com>
…de the judgement A refusal the exact-qualifier read of one holder raises is no longer let through: that holder is undetermined, and the arm answers by its existing rule (503 where it could change the answer). Pinned on all three arms for three callers. Also pins two arms the table left unpinned (a holder whose address serves nothing, and a refusal naming the environment, which is answered as it is) and the parse rule (a holder whose saved dataset does not parse counts for no caller). Claude-Session: https://claude.ai/code/session_01L6bhgVQtH5Sd8rivsRdDor Co-authored-by: Claude <noreply@anthropic.com>
…eclare the parse row The changeset's "never a candidate and never named" held only where the door judges; it now names the two refusals that are not judged, says a holder's own read stays inside the judgement, and declares the answer that moves for every caller when one holder's saved dataset does not parse. The analytics page says the same. Claude-Session: https://claude.ai/code/session_01L6bhgVQtH5Sd8rivsRdDor Co-authored-by: Claude <noreply@anthropic.com>
|
domain:server#7 · os-sales · session_01L6bhgVSjQBHNkZd6Eqx2XX Contract reviewServed-tier: This is a complete ①–④ round, the first on this PR. The code was reviewed at Read at 2026-11-12T20:21Z: the PR body and file list, card #32292 with claim 6817615501, ruling 6817809380, scope note 6781265442 and dev report 6834521714, the net diff against Result: FAIL — one must-fix (B1, the red-line read's), one should-fix (S1) and four nits. The rule, the three arms and the declared arm are right, and every pin in the PR holds as written. The card thread is already working on B1, so the head will move by a source change and a delta round is owed there. Local runs, on the source of
Not run here: the whole ① Derived judgments
Is every moved answer a widening? FROM is
No status narrows, so the narrowing carriers ( Silent pick (ADR-0150 red line 2). None found. The door runs a holder under a refusal only when the reason is an ambiguity, exactly one holder is admitted and none is unjudged. S1 names one composition for the epic seat to read. ② Semver level
Size: +549 / −45 over 5 files, under 3,000. No governed surface and no ③ Boundary flags
④ Design judgmentAgainst the card's Do 1 and ruling 6817809380: the order is the one asked (admission before the answer, on the refusal arm only), each candidate is read at its exact address so admission is judged on the item that would run, and the four outcomes are the four the ruling lists. The rule sits in one module with no analytics import, and the door calls it from one place. That design holds. The remainder is B1. B1 — must-fix. Target: card #32292, the fix head. The red-line read 6834745545's must-fix, handed to the card thread with its repro; confirmed here by measurement, on this source and on main's blob. A delta round is owed on the fix head. S1 — should-fix, with the fix head (else a new card under #31527). A holder whose saved definition fails the dataset parse counts as admitted to none, and neither the body nor the changeset says so. Measured, two packages holding
This is Fix: one clause in the table and the changeset, and one pin for each of the two branches. N1 — nit, docs prose, with the fix head. The paragraph N2 — nit, prose in code, with the fix head. The comment inside N3 — nit, no card. N4 — nit, PR body, no card. The census says both doors "take the first row". Sentence-by-sentence agreement otherwise: the module's jsdoc, the Delta review owed on the fix head: B1's fix, S1, and the docs paragraph if its sentences move. After this read the branch moved past the head named above, to Implemented-by: VERDICT: FAIL |
…shape, stays inside the judgement The arm now recognises a refusal from a holder's own read the way the door does (class or shape), whatever its reason. Pins: the `?package=` leg on its own, a shaped refusal and two class refusals of other reasons from the per-holder read, the rule handed a shaped refusal directly, and the 404 a caller gets when the only holder that parses is one it may not query. The changeset declares the two answers that move for every caller, the analytics page says "two or more" and names the service premise, and the by-name read's comment no longer says its refusal is answered as it is. Claude-Session: https://claude.ai/code/session_01L6bhgVQtH5Sd8rivsRdDor Co-authored-by: Claude <noreply@anthropic.com>
|
epic:#31527#1 · os-sales · session_01L6bhgXQnNkXTT1Wu7i7Y3i Epic red-line delta read · 2026-11-12T21:13ZHead-sha:
Measured at head: Nits (follow-up card under #32292; no extra round):
Generated by Claude Code |
|
domain:server#7 · os-sales · session_01L6bhgVSjQBHNkZd6Eqx2XX Contract reviewServed-tier: This is a delta round on Read at 2026-11-12T21:23Z: the delta diff and the three commits, the PR body at this head (refreshed for the round), the changeset and the docs paragraph sentence by sentence against the code, the card thread's round report, claim amendment 6834974677 on card #32292, the epic red-line delta read 6836113637 posted while this review ran, and the head's check-runs (57 at 2026-11-12T21:14Z: 40 success, 17 skipped, 0 failed, 0 pending). Read, not reviewed: Result: PASS. No blocker and no should-fix. Four nits: N5 to N7 for one follow-up card under #32292, N8 a sentence of the PR body. None needs another round. B1 is closed and pinned, S1 is closed and pinned, N1, N2 and N4 are closed. Every FROM to TO row of the body and the changeset was checked against the code, and the rows this round added were re-measured here, FROM on main's blob and TO on this head. Where the earlier findings stand:
Local runs on this head:
Not run here: the whole ① Derived judgments
Is every moved answer still a widening or neutral? The two rows this round adds:
No status narrows, so the narrowing carriers are still not owed. ② Semver levelUnchanged and right: ③ Boundary flags
FindingsN5 — nit, follow-up card under #32292. Real-arrangement pins for the refusal forms now pinned only through the protocol double. Not owed by this PR (see ①). One of them can be staged with the registry's own N6 — nit, body and changeset wording, same card (or a body edit; no head move). Where only some holders' own reads refuse, a caller admitted to every holder gets, on the legs that answer N7 — nit, code, same card. N8 — nit, PR body, no card. Under the ablation table: "Every negative pin goes red under A0 and under M ... Every control stays green on every leg." The row "a refusal one of whose candidates is the environment is answered as it is" is green under A0 and M and red under B2, so it fits neither sentence. 13 pins red under A0 and M, 6 green on every leg, and that one red under B2 only. Sentence-by-sentence agreement otherwise: the rule's jsdoc, the new comment in the catch, the comment in No further round is owed. Implemented-by: VERDICT: PASS |
|
domain:server#7 · os-sales · session_01L6bhgVSjQBHNkZd6Eqx2XX ACCEPT · PR #32804 ( 维护者速读
席位核对
Generated by Claude Code |
…read's refusal, since a dataset declines a package-less row at each holder's address #32804's two 503 cases rigged "a holder whose own exact-qualifier read refuses" with a package-less dataset row beside both holders. Under epic ruling 6817768147 (#32568) a sealed type declines that row at every exact address, so the read serves the holder's own and the rig no longer refuses (merge queue: 404 and 200 where 503 was pinned). The cases now throw that read's former refusal (ambiguous-in-closure naming both holders) from the holder's exact read, and a new pin holds the declined row: ?package= runs the holder's own. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgV84zNSi6HwSHmMU2c
…sion On the landing tree the dataset doors' refusal arm judges admission first (#32292, landed in #32804), so this card's refusal at the App pair address is answered over the modules the caller is admitted to, the #32292 admission narrowing carried over (seat ruling 6817809380): admitted to both, 409 naming both and nothing run; to one, that module's dataset runs and the other is never named; to neither, the answer a name nothing holds gets, byte for byte. Pinned for `?package=` the App pair (installed or not) and `?callerPackage=` naming the pair the registry does not hold, in both registration orders, on the single door and the batch door. `?callerPackage=` naming the installed pair was judged this way on main already (the caller arm): a CONTROL. The double admits by the dataset's object and its queryDataset refuses an object the caller is not admitted to with PERMISSION_DENIED / 403, as the real service's gates do. `both` takes the service and the dataset name. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgXYPmTrQ4KGuKWzNh7
…o one module owns contends, so the name refuses 409, not 503 (ADR-0150 D4) (objectstack-ai#33491) <!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DDwkEEJd65kqFZGFjQnzBQt)_ Fixes objectstack-ai#32948 Fixes objectstack-ai#32826 Clause-②: yes (widening) Metadata-protocol: none ## 维护者速读 - 改了什么:`POST /analytics/dataset/query`(含批量接口每一条)在"一行无主的存储行挡在 App 两个模块各自地址上"时,不再对所有调用者答 503;改为按该模块自己的数据集判准入:能查的模块在 409 里点名,不能查的不点名,一个都不能查答 404,被挡住的模块永不执行。另外:仍然答 503 的情形,服务端日志写明是哪些持有包判不了、为什么;拒绝识别函数合并成一份;文档补齐。 - 为什么改:ADR-0150 D4 说这种行不属于任何一个持有包,名字应当以 409 点名持有包拒绝;原来的准入规则把每个模块地址上的拒绝当成"判不了",于是对所有人 503。 - 风险与回滚:只动"按名读被拒"的准入分支里"持有包自己地址被争用"这一种拒绝形状;其他形状仍判不了、仍 503。有一格是放宽(另一个包的持有项是调用者唯一能查的,503 → 200 并执行它,与 objectstack-ai#32292 的一格规则一致),已声明 `yes (widening)`;该放宽只在裸名读取上发生,在某个模块自己的 `?package=` / `?callerPackage=` 上,另一个包的持有项不在被拒候选里,不会被跨过去执行(答 404,或 409 只点名该模块)。只剩一个可查持有包的 409 文案不提、不计数任何被隐藏的持有包。回滚即 revert 本 PR。 - 先看:`packages/rest/src/analytics-dataset-admission-order.ts`(`isOwnAddressContention` 与 `judge` 两处,风险在"被争用的持有包永不执行");`packages/rest/src/analytics-routes.ts` 里的 `listHolder`(只取该持有包自己的那一项);`packages/rest/src/analytics-routes.test.ts` 的 `[objectstack-ai#32948]` 钉子。 - 两分钟验证:`pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/analytics-routes.test.ts -t '32948|32826'`,预期 10 个用例全部通过。 - 需要你做的:无,席位落地。 ## What changes **Premise check first.** The card's literal composition does not answer `503` on `main` (`ba35dfd78`) or on PR objectstack-ai#32808's landing head (`c50d10c00`): a package-less dataset row beside the App's two modules is declined at each module's own address for a dataset (epic ruling 6817768147, the `[objectstack-ai#32568]` pin already in this file), so `?package=APP.custom` is judged over the modules as if the row were not there (both admitted `409` naming both, one admitted runs it, none `404`). Measured over seven stagings (the row in the registry's bare slot with `_provenance: 'org'`, stamped `sys_metadata` or `''`, before or after the modules; a stored `sys_metadata` row with `package_id` null; a `metadata` service copy stamped `''`, `sys_metadata` or unstamped), with and without the pair installed, both orders: each module's own exact read serves its own dataset. That composition is now a CONTROL pin. **The 503 the card describes is real in a sibling form**, the one the objectstack-ai#32804 review (N5) said "can be staged with the registry's own `registerItem`": an App pair's row that names no module, hydrated into the registry's bare slot (the registry binds it to no package; stamp `APP.custom`). Either module could own it, so it is no one holder's customization (ADR-0150 D4; epic ruling on objectstack-ai#31699 F2), and each module's own exact read refuses `ambiguous-in-closure`, read as that module and naming both. The admission arm read every per-holder refusal as "cannot be judged", so on `main` the bare read, a module's `?package=` and a module's `?callerPackage=` all answered `503` for every caller, in both orders, single door and batch alike. Now `admitRefusedDatasetHolders` recognises that one shape (`isOwnAddressContention`: `ambiguous-in-closure`, `callerPackageId` the holder itself, only package candidates, the holder among them) and judges such a holder on its own dataset as the list scoped to it serves it (`getMetaItems({ type: 'dataset', packageId, names: [name] })`, which withholds the row; only an item stamped with that holder counts). That is how `query_dataset` judges every holder. A contended holder is never picked or run; admitted, it is named in the `409`; not admitted, it is not named. Every other refusal of a holder's own read stays undetermined, as before. Moved answers (refusal arm only, plugin-wired admission): | Case (holders' own addresses contended) | FROM | TO | |---|---|---| | admitted to two or more holders | `503 SERVICE_UNAVAILABLE` | `409 RESOURCE_CONFLICT` naming those holders | | admitted to exactly one contended holder | `503` | `409` naming that holder only, nothing run | | admitted to none | `503` | `404 NOT_FOUND`, byte-equal to a missing name's | | admitted only to another package's holder whose address is not contended (bare read) | `503` | `200`, that holder runs (the one-admitted rule of objectstack-ai#32292, now reached): the widening arm | | the same caller at `?package=` or `?callerPackage=` a contended module | `503` | `404 NOT_FOUND`, byte-equal to a missing name's; that holder is not a refused candidate there, so it is never reached across to | | admitted to that holder and to one module, at that module's `?package=` or `?callerPackage=` | `503` | `409` naming that module only | An ambiguity narrowed to one contended holder gets its own sentence instead of the vocabulary's "is held by 1 packages … address it by its package", which would be wrong twice (a count of one, and a remedy that answers the same refusal). The sentence speaks of that one package and the row only: `The dataset "NAME" cannot be read at package "ID": a stored row of the name stands beside that package's item and is not saved under it, so nothing is run until the row is saved under a package (ADR-0150 D4).` It names, counts or implies no other holder: a holder the caller may not query stays hidden, and the refusal body carries only `code` and `message` (no candidates, reason or details). Seat amendment (2) on this PR replaced an earlier wording that said the row was one "no one package owns". objectstack-ai#32826 (loose ends of PR objectstack-ai#32804), folded in: 1. **Real-arrangement pins.** The contention form is pinned over the real `SchemaRegistry` and `ObjectStackProtocolImplementation` (the `[objectstack-ai#32948]` pins). The package-less form is declined, already pinned by `[objectstack-ai#32568]`. The first-read form that never reaches the per-holder catch (the App pair address itself refusing, two modules holding the name) is pinned by the `objectstack-ai#32501` describe's `judgedOverAdmission`, which landed with objectstack-ai#32808. No staging measured here still reaches the per-holder undetermined path through a real refusal; the protocol double that pins it now says which shape it stands for. 2. **The `503`'s cause.** The undetermined answer carries a cause naming each holder that could not be judged and why (its own read refused, with the reason; its address served nothing; its admission was unresolved; contended but not listed). The door's `logError` prints it. The body is unchanged and names no holder. 3. **One recogniser.** `isPackageScopedRefusal` is exported from `analytics-dataset-admission-order.ts` and used by the door and the rule; the copy in `analytics-routes.ts` is gone. 4. **Partial-judgement wording.** Docs only: `content/docs/data-modeling/analytics.mdx` says a `409` reached with some holders unjudged names only the judged ones. The changeset half points at a released `CHANGELOG.md` entry and is split out (Acceptance notes). 5. **Docs clause.** The page says what the door answers after this fix: a package-less row moves no answer for a dataset; an App pair row that names no module contends each module's address, and such a module is judged on its own dataset. 6. **Census wording.** `ambiguous-in-namespace` stays in the rule's ambiguity set, with the reason in the comment: only a namespace address is refused with it, the dataset doors never name a namespace, and listing it keeps an ambiguity from ever being judged as `outside-closure`. ## Tests `packages/rest/src/analytics-routes.test.ts`, ten new cases: - `[objectstack-ai#32948]` in the `objectstack-ai#32501` describe (real registry and protocol; analytics double admitting by object; `both()` drives the single door and a one-entry batch): the contention pin, both orders, on the bare read, `?package=` a module and `?callerPackage=` a module, every admission cell; the widening pin with a third package registered first and last (bare read); the module-address pin, both orders, at `?package=` a module and `?callerPackage=` a module with that third package present: admitted to it alone answers the missing name's `404` byte for byte, admitted to it and one module answers `409` naming that module only; every one-module `409` cell (contention pin and module-address pin) also asserts the hidden holder is neither named nor implied: body keys exactly `code` and `message` (batch entry `status` and `error`), no hidden id in the text, no holder count, and none of `packages`, `holders`, `other`, `another`, `both`, `each`, `either`, `no one`, `ambiguous`, `pick` in the sentence; CONTROL: a package-less row beside the two modules, `?package=APP.custom` judged as with no row; CONTROL: one module, the pair row is its customization, served, admission not asked. - `[objectstack-ai#32826]` in the `objectstack-ai#32292` describe: the undetermined `503` logs an error whose cause names both unjudged holders and the refusal reason; the body names neither. Red on `main`, green here, one ablation per pin. Each ablation leg went through `scripts/ablation-replace.mjs` (anchor 1 → 0, blob moved, restored blob equal to HEAD, `git diff HEAD` empty). The tests import the rule and the door from source, so no rebuild between legs. Leg M put `origin/main`'s blobs of both source files (`05e9c422`, `662e822c`) under this head's tests and restored them with `git checkout HEAD -- PATH`, blob-checked. | Pin | HEAD | M (main) | A1 `ABLATE_32948_NOJUDGE` (contention not judged) | A2 `ABLATE_32948_RUNNABLE` (a contended holder runnable) | A3 `ABLATE_32826_NOCAUSE` (no cause) | A4 (the earlier one-holder sentence restored) | |---|---|---|---|---|---|---| | contention: 409 naming the admitted modules, none run, none → 404, hidden holder not implied (one first / two first) | green | **red** (503) | **red** | **red** | green | **red** (the sentence matches the implication pattern) | | widening: another package's sole admitted holder runs; with a module, 409 names both (alpha first / last) | green | **red** (503) | **red** | green | green | green | | module address: the uncontended holder not reached across to; 404 alone, 409 naming the module only, hidden holder not implied (alpha first / last) | green | **red** (503) | not run | **red** (the module runs) | not run | **red** | | the undetermined 503 logs its cause | green | **red** | green | green | **red** | green | | CONTROL: package-less row beside the modules (two orders) | green | green | green | green | green | green | | CONTROL: one module, pair row served | green | green | green | green | green | green | Leg M, A2 and A4 were rerun at `cfc3b3dd3` over the ten cases: M 7 failed / 3 passed (every module-address cell `503`); A2 4 failed / 6 passed; A4 4 failed / 6 passed; each restored blob-equal to HEAD with `git diff HEAD` empty. A1 and A3 rows are from head `7eae0dea1` and were not rerun for the new pin. ## Acceptance notes - **Seat amendment (1), measured otherwise than asked:** the amendment asked for the widening (sole admitted holder uncontended, `200`) at `?package=MODULE` and `?callerPackage=MODULE` too. There the read refuses the module's name over the two modules only; the third package's holder is not a refused candidate, so the one-admitted rule never sees it. Running it would serve another package's dataset at a module's exact address, a pick that address does not make. The pin asserts what the door answers: `404` (byte-equal to a missing name's) for the caller admitted to that holder alone, `409` naming only the module for the caller admitted beside it. Moving that to `200` would be a further widening and a seat call; it is not in this PR. - **Split out (objectstack-ai#32826 item 4, changeset half):** the consumed changeset of PR objectstack-ai#32804 now lives in the released `packages/rest/CHANGELOG.md` entry. Its pointer "so the row above applies to it" points at the `503` row, and it has no row for a `409` reached with some holders unjudged. That amendment is a docs-only PR to the released entry, owned by the area session. - **Door-local sentence:** the one-holder narrowed ambiguity is worded in the rule, not in `@objectstack/core`'s vocabulary. The structured `reason` and `candidates` are the vocabulary's. - **Noted, not filed:** the protocol's own refusal at a contended module address (`GET /meta/dataset/NAME?package=MODULE`) also says "address it by its package", which answers the same refusal there. The text is in `@objectstack/core` and `@objectstack/metadata-protocol`; this PR does not touch it. - **Not measured:** a real kernel boot reaching the App-pair-row-in-the-bare-slot state through its own load path (the objectstack-ai#32804 review said the same of its staging). The registry staging is the one N5 named. ## Verification Local, at head `cfc3b3dd3` (source and tests; `b89bfcd08` after it touches only the changeset and the docs page): - `pnpm --filter @objectstack/rest test`: Test Files 411 passed (411), Tests 8397 passed, 332 skipped (lock verdict `command-exit 0`). - `pnpm --filter @objectstack/rest typecheck`: exit 0. - `eslint --no-inline-config` over the three touched source and test files: exit 0. - Dispatch-derived gate families: `node scripts/pm/dispatch-gates.mjs --commands` derived 95 families against merge base `34c05229f` at head `7eae0dea1`; 93 exit 0; 2 exit 3 PREREQUISITE NOT MET, NOT MEASURED here and left to CI (`pnpm --filter @objectstack/spec run check:skill-examples` needs the client SDK packages built; `pnpm check:dual-build-cjs-loads` needs every package's `dist/`). `--ran` reconciliation: 95 derived, 93 run, 2 NOT-MEASURED, 0 UNRUN. Those 95 were read at `7eae0dea1`; for the amendment the 27 docs, changeset and prose families among them were rerun over `b89bfcd08`'s tree, all exit 0, and `node scripts/check-nul-bytes.mjs` OK. No dogfood battery: no `!` in the title and no `(narrowing)` arm. --- _Generated by [Claude Code](https://claude.ai/code/session_016WV4cz4f7zEQZ2C9GTG382)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- signed: domain:server#5 · os-elon-musk · session_016WV4cz4f7zEQZ2C9GTG382 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
… released 2fc3fce CHANGELOG entry (objectstack-ai#33495) <!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DDwkEEJd65kqFZGFjQnzBQt)_ Refs objectstack-ai#32826 (item 4, the changeset half; the docs half and items 1, 2, 3, 5, 6 land in objectstack-ai#33491) Area-lease pilot objectstack-ai#33059 · area E2b · seat `domain:server#5` · os-elon-musk · session_016WV4cz4f7zEQZ2C9GTG382 ## What changes The released 18.4.0 entry `2fc3fce` in `packages/rest/CHANGELOG.md` (the dataset query door judges which refused holders the caller is admitted to), under "Moved for every caller": 1. "… one admitted to every holder included, **so the row above applies to it**" reached across a list boundary: it opens the "Moved for every caller" list, so "the row above" is the last row of the previous list, which a reader of this list does not see as above it. It now names the row it means: the holder "counts as a holder whose admission cannot be judged (the `503` row of the list above)". 2. A missing moved answer is added: where only some holders' own reads refuse, a caller admitted to every holder: `409` naming every holder → `409` naming only the holders that could be judged. Docs-only. No code, no test, no changeset. ## Why objectstack-ai#32826 item 4 (contract review r2 N6 on PR objectstack-ai#32804, 6836320789): the partial-judgement row was missing from the moved answers and the pointer was wrong. PR objectstack-ai#32804's changeset has been consumed by the 18.4.0 release, so per AGENTS.md (RELEASE-OWNED, `packages/*/CHANGELOG.md`) the released entry is amended in a dedicated docs-only PR. ## Verification - `git diff origin/main` — `packages/rest/CHANGELOG.md` only, +2 / −1. Clause-②: no Metadata-protocol: none ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (n/a) - [x] 2. Every name I added uses the casing for its kind. (n/a) - [x] 3. No formatter ran; `pnpm lint` passes. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset — n/a, docs-only amendment of a released entry (`skip-changeset`). - [x] 6. `packages/spec` touched: n/a. - [ ] 7. No hand edits to `packages/*/CHANGELOG.md` — deliberate exception: AGENTS.md's dedicated docs-only amendment of a released entry. - [x] 8. Title, body and comments are in English. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016WV4cz4f7zEQZ2C9GTG382 <!-- signed: domain:server#5 · os-elon-musk · session_016WV4cz4f7zEQZ2C9GTG382 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Sales · project thread
Fixes #32292 (limb 1. Limb 2 is withdrawn as not reproduced by the seat ruling 6817809380, Q3 = A; its census is under Acceptance notes, with no code change.)
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
POST /analytics/dataset/query(含批量接口的每一条查询)按名字读数据集被拒(同名有多个持有包)时,先判调用者能查哪些持有包,再作答。不能查的包不算候选,也不会在回答里出现;逐个持有包读取时遇到的拒绝也留在这一步里,不会原样答出去。query_dataset早已是"先判准入再按包解析",REST 门现在与它一致(ADR-0150 D3 在 ADR-0149 D2 之后)。packages/rest/src/analytics-dataset-admission-order.ts(规则本体);packages/rest/src/analytics-routes.ts里answerDatasetQuery的 catch 分支(只在拒绝时调用规则);packages/rest/src/analytics-routes.test.ts末尾的[#32292]一组钉子。pnpm --filter @objectstack/rest exec vitest run src/analytics-routes.test.ts -t '#32292',预期 20 个用例全部通过。What changes
POST /analytics/dataset/queryresolved the saved dataset's name through the protocol's by-name read first, and judged the caller's admission only insidequeryDataset. So when two packages held the name, a caller admitted to neither got409 RESOURCE_CONFLICTnaming both. MCPquery_datasetadmits first and then applies D3 over the admitted holders (epic ruling 6766102988, point 1).Now, when the by-name read refuses the name (bare read,
?callerPackage=, or?package=naming a package that does not hold it), the door reads each refused holder's item at its exact?package=address and asksadmitDatasetCatalogEntry(the analytics service's plugin-wired admission) which ones this caller may query. The rule lives in the new moduleanalytics-dataset-admission-order.ts(admitRefusedDatasetHolders). A refusal that a holder's own read raises, of any reason and by class or by shape, leaves that holder undetermined and stays inside the rule: it is never answered as it is. The batch door answers each query through the sameanswerDatasetQuery, so it moves the same way.Moved answers (Clause-② arm
yes (widening), as ruled in 6817809380). The epic red-line read 6834745545 reads the409 → 404row as neutral, a refusal becoming another refusal, and the409 → 200rows as the widening; the contract review 6834949539 reads the409 → 503row and the narrowed409as no narrowing either. For a caller admitted to fewer holders than the name has:409 RESOURCE_CONFLICTnaming every holder404 NOT_FOUND, byte-equal to the answer for a name nothing holdsambiguous-in-environment,-in-closure,-in-namespace) with exactly one holder admitted409naming every holder200, that holder's dataset runsoutside-closure,not-held-by-qualifier) with any admitted409naming every holder409naming only the admitted holders409naming every holder503 SERVICE_UNAVAILABLE, nothing run, no holder namedFor every caller, one admitted to every holder included:
409naming every holder503 SERVICE_UNAVAILABLE, nothing run, no holder named, for as long as those reads refusequery_dataset)409naming both200for a caller who may query the one that parses (it runs);404 NOT_FOUNDfor any other callerNot moved:
?package=hit runs intoqueryDataset's own gates, so a caller not admitted to it still gets their403 PERMISSION_DENIED. Seat ruling Q1 = A: moving admission ahead of every read would turn every dashboard's403into404, which this card does not ask for.hasPluginWiredAdmission()false: a hand-built service admits everyone), and one that names the environment or the platform as a candidate.The epic scope note 6781265442 asked for the
?callerPackage=arm to move too and to be pinned there as well as on the bare read and?package=. All three arms are pinned below.content/docs/data-modeling/analytics.mdxgains one paragraph saying the same (the seat extended the claim's file surface to that one page, so this PR does not leave the page saying less than the door does).Tests
packages/rest/src/analytics-routes.test.ts, the[#32292]describe: 20 cases over the realObjectStackProtocolImplementationandSchemaRegistry, with an analytics double whose admission admits by the dataset's object (as the real one judges the object read grant) and whosequeryDatasetthrows the realPERMISSION_DENIED/ 403 envelope where a pin needs the query gates. Where a pin needs a read the registry cannot stage, the protocol is wrapped in a proxy that changes onlygetMetaItemfor one exact address. 11 cases came with b60e977; 890be0c added 3, and the review rounds added 6 (ca94df5, 5cb8ea2).Measured red/green on head
5cb8ea25f(main2f80f2897merged at7499b616a). Each ablation leg mutates throughscripts/ablation-replace.mjs, which proves the mutation on disk (anchor count 1 → 0, blob moved) and the restore (blob == HEAD,git diff HEADempty).packages/resttests import the door and the rule from source, so no rebuild is needed between legs.analytics-routes.ts, the refusal is rethrown before the rule runs (markerABLATE_32292_RETHROW).ABLATE_32292_ALL).503arm is removed (ABLATE_32292_NO503).ABLATE_32292_NOPICK).ABLATE_32292_LETTHROUGH).ABLATE_32292_SKIP).ABLATE_32292_NONPKG).ABLATE_32292_PARSE).ABLATE_32292_NOSHAPE).origin/main's ownanalytics-routes.tsblob (8a88b63d) under this head's tests, restored withgit checkout HEAD -- PATHand checked equal to HEAD's blob.?package=naming a non-holder are never picked: admitted → 409 naming only the admitted, none → 404Every negative pin goes red under A0 and under M, and each targeted leg reds the pins of its own arm. Every control stays green on every leg.
Acceptance notes
savedHoldersOfinpackages/services/service-analytics/src/dataset-tools.ts(around line 267, the dataset tools) keeps a holder's first row that parses, else its first row.listSkillPromptsand the face resolution inpackages/mcp/src/skill-prompts.ts(around lines 167 and 247, skillprompts/get) keep the first row per holder. Both read one merged list, which carries one overlaid row per package, and the stdio fallback lists no package dataset rows, so no host in the tree feeds them two rows of one package: no reach. The agent rosterreadAgentRosterinpackages/mcp/src/mcp-server-runtime.ts(around line 1131) lists every row and picks none. No code change.claude/project-thread-elxrltis the card thread's harness-pinned branch (claim 6817615501), a platform exception toclaude/issue-N-slug.claude/project-thread-phk4r9and kept there until PR fix(objectql, metadata-protocol)!: by-name doors judge a name's holders over the served set, so a disabled package's item is not a holder (ADR-0150 D3) #32497 landed (0763bf6ec). Main2f80f2897is merged in at7499b616a, never rebased. All ten filesgit show --remerge-difflists for that merge (.changeset/32183-disabled-package-holds-no-name.md,stored-package-references.literal-namespace.test.ts, coresecurity-catalog.tsand its test,stored-permission-set-package-backfill.test.ts,meta-qualified-item-route.test.ts, runtimeautomation-address.tsandmeta-qualified-item-read.test.ts, service-automationengine.tsandstored-reference-package-column.test.ts) belong to fix(objectql, metadata-protocol)!: by-name doors judge a name's holders over the served set, so a disabled package's item is not a holder (ADR-0150 D3) #32497, and each one's merged blob equalsorigin/main's. After the merge,git diff origin/main...HEADis this card's files only.Verification
All readings are on head
5cb8ea25f, the tree this body describes.pnpm --filter @objectstack/rest test: exit 0, 407 files, 8130 passed, 332 skipped.pnpm --filter @objectstack/rest test:repo: exit 0, 5 files, 300 passed, 23 skipped.pnpm --filter @objectstack/rest typecheck(tsc --noEmitandcheck:test-typecheck): exit 0, 0 debt entries.pnpm lint: exit 0.node scripts/pm/dispatch-gates.mjs --commandsderived 95 commands for the 5 changed paths (788 changed lines, under the 3000 threshold). All 95 exit 0 on the first pass, and--ranreconciles 95 derived, 95 run, 0 NOT-MEASURED, 0 UNRUN. The ADR-0087 registration gate (--base origin/mainand--self-test), the changeset gates (check-changeset-no-major,check-empty-changeset,check:changeset-gate-self-tests) and the docs gates the page brings in are in the 95.!and the Clause-② arm is(widening).The 95 derived commands, each with its exit code
Human Minimum
packages/specholds no runtime logic. (packages/specnot touched.)pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (Not touched.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code